VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3090
   ScaleWidth      =   4680
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim c, k, m As Connection
Dim rs, rsk, rsm As Recordset

Private Sub Form_Load()
Call databasemadurai
rsm.Open "select * from customer", m

While Not rsm.EOF

Call database
rs.Open "select * from customer where jvm='" & rsm!JVM & "'", c

If rs.EOF Then
    
    rs.Close
    
    Call datebasekarai
    rsk.Open "insert into customer value('" & rsm!JVM & "','" & rsm!DateCom & "','" & rsm!PlanNo & "','" & rsm!Term & "','" & rsm!mop & "','" & rsm!Inst & "','" & rsm!Amt & "','" & rsm!Name & "','" & rsm!Age & "','" & rsm!Gender & "','" & rsm!RName & "','" & rsm!NName & "','" & rsm!NAge & "','" & rsm!NRelation & "','" & rsm!address & "','" & rsm!DistributorCode & "','" & rsm!css & "','" & rsm!Reciept & "','" & rsm!Relationship & "','" & rsm!Printed & "','" & rsm!DOE & "','1','')", k
End If

rsmm.MoveNext
Wend



End Sub


Private Sub database()
Set c = New Connection
c.Provider = "Microsoft.Jet.OLEDB.4.0"
c.Open App.Path & "\jeevan.mdb"

Set rs = New Recordset
rs.CursorLocation = adUseServer
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic

End Sub

Private Sub databasemadurai()
Set m = New Connection
m.Provider = "Microsoft.Jet.OLEDB.4.0"
m.Open App.Path & "\madurai\jeevan.mdb"

Set rsm = New Recordset
rsm.CursorLocation = adUseServer
rsm.CursorType = adOpenKeyset
rsm.LockType = adLockOptimistic

End Sub

Private Sub datebasekarai()
Set m = New Connection
m.Provider = "Microsoft.Jet.OLEDB.4.0"
m.Open App.Path & "\jeevan.mdb"

Set rsk = New Recordset
rsk.CursorLocation = adUseServer
rsk.CursorType = adOpenKeyset
rsk.LockType = adLockOptimistic

End Sub

